package com.roc.steelend.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.List;

/**
 *销售订单
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "sale_order")
public class SaleOrder {

    @TableId(type = IdType.INPUT)
    @JsonSerialize(using = ToStringSerializer.class)
    private BigInteger saleOrderId;
    private Integer clientId;
    private Integer employeeId;
    private BigDecimal freight;
    private String remark;
    private Date outStorageDate;
    private Timestamp operateTime;
    private Integer paymentIsSettled;
    private BigDecimal orderTotalMoney;
    private BigDecimal given;
    private Integer isReconciliation;
    @JsonSerialize(using = ToStringSerializer.class)
    private BigInteger reconciliationId;
    private Integer isWriteOff;
    private Integer  isInvoice;
    private BigDecimal sumMoney;
    private BigDecimal invoiceMoney;
    private Integer invoiceIsSettled;
    private Integer isTiaoPiao;
    @JsonSerialize(using = ToStringSerializer.class)
    private BigInteger tiaoPiaoId;
    private  Integer moLingTou;

    @TableField(exist = false)
    private List<SaleDetail> saleDetailList;
    @TableField(exist = false)
    private Client client;
    @TableField(exist = false)
    private Employee employee;
}
